package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.nio.charset.StandardCharsets;

public class OSWDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos=new FileOutputStream("osw.txt");
        OutputStreamWriter osw=new OutputStreamWriter(fos,StandardCharsets.UTF_8);
        osw.write("金坷垃是哦桑扫了");
        osw.write("垃圾嘎上课了；将大量空间发了快递公司加班率开始打架干嘛呢");
        System.out.println("写出完毕");
        osw.close();

        /*FileOutputStream fos=new FileOutputStream("osw.txt");
        OutputStreamWriter osw=new OutputStreamWriter(fos, StandardCharsets.UTF_8);
        osw.write("破解撒狗粮卡式炉开个会离开\n");
        osw.write("不过撒娇恐龙百科就完全健康\n");
        osw.write("价格；本来\n萨迦路口；撒附近\n");
        System.out.println("写出完毕");
        osw.close();

         */
    }
}
